﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/Admin.Master" AutoEventWireup="true"
    CodeBehind="manangeUser.aspx.cs" Inherits="PHTShop.admin.manangeUser" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript">
        $(function () {
            $(document).keypress(function (event) {
                var keycode = (event.keyCode ? event.keyCode : event.which);
                if (keycode == '13') {
                    return false;
                }
            });

            $('#txtNameSearch').keyup(function (e) {
                $('#listusers').load('Listuser.aspx', { user: $('#txtNameSearch').val() });
                e.preventDefault();
            });

        });
        
        
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="title" class="b2">
        <span runat="server" id="lbltest"></span>
        <h2>
            All user customer</h2>
        <br />
    </div>
    <p></p>
    <div>
       
            User name:
        <input type="text" id="txtNameSearch"/>
          
    </div><p></p>
    <div id="listusers">
    
    <asp:ListView ID="lsv" runat="server" OnSelectedIndexChanged="lsv_SelectedIndexChanged"
        OnSelectedIndexChanging="lsv_SelectedIndexChanging" 
            onpagepropertieschanging="lsv_PagePropertiesChanging">
        <LayoutTemplate>

                       <table cellspacing="0" id="postList" class="listTable">
                <!-- Thead -->
                <thead>
                    <tr>                        
                        <th class="header">
                            <a title="Post" href="#">User name</a>
                        </th>
                          <th class="header">
                            <a title="Post" href="#">Full name</a>
                        </th>
                        <th class="header">
                            <a title="Post" href="#">Address</a>
                        </th>
                         </th>
                           <th class="header">
                            <a title="Post" href="#"> Phone</a>
                        </th>
                       
                           <th class="header">
                            <a title="Post" href="#"> Active</a>
                        </th>
                       
                        <th class="header">
                            <a title="Author" href="#">Action</a>
                        </th>
                    </tr>
                </thead>
                <tbody>
                    <asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder>
                </tbody>
            </table>
        </LayoutTemplate>
        <ItemTemplate>
            <tr>                   
                <td>
                    <span id="lblUsername">
                        <%# Eval("username") %></span>
                        <asp:HiddenField ID="hdfUserID" runat="server" Value='<%# Eval("id") %>' />
                
                </td>
                <td>
                    <span id="lblFullName">
                        <%# Eval("fullname") %></span>
                </td>
                <td>
                    <span id="lblAddress">
                        <%# Eval("Address") %></span>
                </td>
                <td>
                    <span id="lblPhone">
                        <%# Eval("Phone") %></span>
                </td>
                <td>
                    <asp:CheckBox ID="chxActive" runat="server" Checked='<%#Eval("Active") %>' />
                </td>
                <td>
                    <asp:LinkButton ID="lbtnBills" runat="server" CommandName="Select">Ordered</asp:LinkButton>
                </td>
            </tr>
           
        </ItemTemplate>
    </asp:ListView>
    <div class="paginate">
            <asp:DataPager ID="DataPager1" runat="server" PagedControlID="lsv" PageSize="10" >
                <Fields>
                    <asp:NextPreviousPagerField ShowFirstPageButton="true" ShowPreviousPageButton="true"
                        ButtonType="Link" ShowNextPageButton="false" ShowLastPageButton="false"  />
                    <asp:NumericPagerField ButtonType="Link" />
                    <asp:NextPreviousPagerField ShowFirstPageButton="false" ButtonType="Link" ShowPreviousPageButton="false"
                        ShowNextPageButton="true" ShowLastPageButton="true" />
                </Fields>
            </asp:DataPager>
        </div>
    </div>
    
  <p></p>
   
</asp:Content>
